#ifndef COMPRESSSENDTHREAD_H
#define COMPRESSSENDTHREAD_H
#include <QThread>
#include <QMutex>
#include "compresssend.h"


class CompressSend;
class CompressSendThread : public QThread
{
    Q_OBJECT
public:
    CompressSendThread(QObject *parent = nullptr);
    void run();
    void addTask(CompressSend *task);
    void stop(){ m_bStart = false;}

    CompressSend *popTask();
signals:
    void CompressPictureOver();

private:
    QList<CompressSend *> m_taskList;
    QMutex m_mutex;
    bool m_bStart = true;
};

#endif // COMPRESSSENDTHREAD_H
